package com.winenine999.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.winenine999.custom.dao.CWinetypeMapper;
import com.winenine999.generator.dao.WinetypeMapper;
import com.winenine999.jdbc.dao.WinetypeDao;
import com.winenine999.model.Page;
import com.winenine999.model.Winetype;
import com.winenine999.service.IWinetypeService;
@Service
public class WinetypeService implements IWinetypeService {
	@Autowired
	private WinetypeMapper winetypeMapper;
	@Autowired
	private CWinetypeMapper cWinetypeMapper;
	@Autowired
	private WinetypeDao winetypeDao;
	/**
	 * 根据id删除winetype
	 */
	@Override
	public int deleteByPrimaryKey(Integer id) {
		
		return winetypeMapper.deleteByPrimaryKey(id);
	}
	/**
	 * 选择字段添加winetype
	 */
	@Override
	public int insertSelective(Winetype winetype) {
		
		return winetypeMapper.insertSelective(winetype);
	}
	/**
	 * 根据id查询winetype
	 */
	@Override
	public Winetype selectByPrimaryKey(Integer id) {
		
		return winetypeMapper.selectByPrimaryKey(id);
	}
	/**
	 * 选择字段修改winetype
	 */
	@Override
	public int updateByPrimaryKeySelective(Winetype winetype) {
		
		return winetypeMapper.updateByPrimaryKeySelective(winetype);
	}
	//-----------------custom------------------------------------------
	/**
	 * 全查winetype
	 */
	@Override
	public List<Map<String, Object>> findAllWinetypes() {
		
		return cWinetypeMapper.findAllWinetypes();
	}
	/**
	 * 分页查询winetypes
	 */
	@Override
	public Page findPageWinetypes(Page page) {
		
		return winetypeDao.findPageWinetypes(page);
	}

}
